<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    protected $tplData = array();

    public function __construct()
    {
    	$user = array(
    		"name" => "morysky",
    		//"avatar" => "https://b.bdstatic.com/searchbox/image/gcp/20180222/4280866648.jpg",
    		"avatar" => "/static/dist/img/avatar.png",
    		"text" => date("Y-m-d H:i:s"),
    		"logout_uri" => "http://www.baidu.com",
    	);
    	$footer = array(
    		"company" => "手机百度基础产品团队",
    		"link" => "http://nebula.baidu-int.com",
    		"copyright" => sprintf("2017-%s", date("Y")),
    	);

    	$topbar = array(
    		"title" => "配置管理",
    		"brief" => "Configure Management",
    		"guide" => array(
    			array(
    				"title" => "test123",
    				"link" => "http://www.baidu.com",
    				"icon" => "fa fa-dashboard",
    			),
    			array(
    				"title" => "test123",
    				"link" => "http://www.baidu.com",
    			),
    			array(
    				"title" => "test",
    				"link" => "http://www.baidu.com",
    				"active" => true,	
    			),
    		),
    	);

    	$navbar_list = array(
    		array(
    			"title" => "配置资源中心(GCP)",
    			"item_list" => array(
    				array(
    					"title" => "平台功能",
    					"icon" => "fa fa-dashboard",
    					"item" => array(
    						array(
    							"link" => "/gcp/config",
    							"icon" => "fa fa-circle-o",
    							"title" => "配置管理",
    							"active" => true,
    						),
    						array(
    							"link" => "#",
    							"icon" => "fa fa-circle-o",
    							"title" => "权限申请",
    						),
    						array(
    							"link" => "#",
    							"icon" => "fa fa-circle-o",
    							"title" => "上传工具",
    						),
    					),
    					"active" => true,
    				),
    			),
    		),
    	);

        $this->tplData = array(
            "title" => "Nebula",
            "title_small_0" => "N",
            "title_small_1" => "b",
            "link" => "/index",
         	"user" => $user,
         	"navbar_list" => $navbar_list,
         	"topbar" => $topbar,
         	"footer" => $footer,
        );
    }
}